package com.zb.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zb.entity.ZjWorkLeaveMessage04;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * 工单留言表 Mapper 接口
 * </p>
 *
 * @author WEN
 * @since 2023-10-24
 */
@Repository
public interface ZjWorkLeaveMessage04Mapper extends BaseMapper<ZjWorkLeaveMessage04> {

    /**
     * 根据工单ID更新工单客服未读留言
     * @param workId 工单ID
     */
    void updateWorkEmpNotReadLeaveMessageByWorkId(@Param("workId") Long workId);

    /**
     * 根据工单ID更新服务商未读留言
     * @param workId 工单ID
     * @param engineer 是否服务负责人兼任工程师：false-不是，true-是
     * @return
     */
    int updateNetworkNotReadLeaveMessageByWorkId(@Param("workId") Long workId, @Param("engineer") boolean engineer);

    /**
     * 根据工单ID更新工程师未读留言
     * @param workId 工单ID
     * @return
     */
    int updateEngineerNotReadLeaveMessageByWorkId(@Param("workId") Long workId);

    /**
     * 根据工单ID更新工单客户未读留言
     * @param workId 工单ID
     * @return
     */
    int updateUserNotReadLeaveMessageByWorkId(@Param("workId") Long workId);
}
